from tkinter import *
root = Tk()
root.title("Марафон. 1 Этап")
root.geometry("500x500")
canvas = Canvas(bg = "white", width = 450, height =  450)
canvas.pack(anchor = CENTER, expand = 1)
x = int(input())
y = int(input())
k = int(input())
if x + 20 * k > 500 or y + 30 * k > 500 or x + 30 * k < 0 or x < 0 or y < 0:
print("NO")
else:
canvas.create_rectangle(x, y + 10k, x + 20k, y +  20k, fill = "blue", outline = "blue")
canvas.create_rectangle(x + 0k, y, x + 10k, y +  30k, fill = "blue", outline = "blue")
